package com.lenovo.codestatreport.jira.mapper;

import com.lenovo.codestatreport.jira.model.Issues;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author Howie Lu
 * @version Created at 2019/05/20
 * @version Updated at 2019/05/21
 * @description 工单记录表
 */
@Mapper
public interface IssuesMapper {

    /**
     * 通过时间段查询工单记录
     * @param start
     * @param end
     * @return
     */
    List<Issues> selectAllIssueRecords(String start, String end);

    /**
     * 通过工单标识查询所有工单记录
     * @param issueKey
     * @return
     */
    List<Issues> selectIssuesByPrimaryKey(String issueKey);

    /**
     * 通过项目标识查询所有工单记录
     * @param projectKey
     * @return
     */
    List<Issues> selectIssuesByProjectKey(String projectKey);

    /**
     * 查询某个项目中包含哪些工单
     * @param projectKey
     * @return
     */
    List<String> selectAllIssuesInProject(String projectKey);

}
